#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
    int a,b;
    cout<<"vvedite A > 999: ";
    cin>>a;
    b = a / 1000;
    b = b % 10;
    cout<<"Tisyachi: "<<b;
    return 0;
}
